//
//  MarketNavigationBar.swift
//  Exchange
//
//  Created by rui on 2018/5/22.
//  Copyright © 2018年 common. All rights reserved.
//

import UIKit

class MarketNavigationBar: UIView {
    
    lazy var titleLabel: UILabel = {
        let title = UILabel()
        title.font = UIFont.systemFont(ofSize: 17)
        title.text = kText("首页")
        title.themeTextColor = ThemeManager.ThemeColorKeys.text1
        title.textAlignment = .center
        return title
    }()
    lazy var contentView: UIView = {
        let view = UIView()
        view.themeBackground = ThemeManager.ThemeColorKeys.background
        view.addSubview(titleLabel)
        return view
    }()
    
    override init(frame: CGRect) {
        super.init(frame: frame)
        initUI()
        self.themeBackground = ThemeManager.ThemeColorKeys.background
    }

    required init?(coder aDecoder: NSCoder) {
        fatalError("init(coder:) has not been implemented")
    }
    
    func initUI() {
        self.addSubview(contentView)
    }
    
    override func layoutSubviews() {
        super.layoutSubviews()
        self.contentView.height = 44
        self.contentView.width = self.width
        self.contentView.x = 0
        self.contentView.bottom = self.height
        self.titleLabel.frame = self.contentView.bounds
    }
    
}
